package ooday04;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

public class Animal {
    String name;
    int age;
    String color;

    void eat(){
        System.out.println("大家好，这是我家的"+name+"今年"+age+"岁了,正在吃饭");

    }
    void drink(){
        System.out.println("你们好，请你们记住我"+name+"正在喝水");
    }
//    void swim(){
//        System.out.println(color+"颜色的"+age+"岁的"+name+"正在游泳");
//    }
    Animal(String name,int age,String color){
        this.name=name;
        this.age=age;
        this.color=color;
    }
}
interface swim{

}
class  Dog extends Animal{
    Dog(String name,int age,String color){
        super(name, age, color);
    }

    @Override
    void eat() {
        System.out.println("大家好，这是我家的"+name+"今年"+age+"岁了,正在吃大骨头");
    }

    void lookHome(){
        System.out.println(name+"在看家");
    };
}


class  Chick extends Animal{
    Chick(String name,int age,String color){
        super(name, age, color);
    }
    @Override
    void eat() {
        System.out.println("大家好，这是我家的"+name+"今年"+age+"岁了,正在喝小米粥");
    }
    void upeggs(){
        System.out.println(name+"会下蛋，已经下了"+age+"年了");
    }
}
class Fish extends Animal{
    Fish(String name,int age,String color){
        super(name, age, color);
    }

}



